package com.handle.system.api.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 登录日志
 * </p>
 *
 * @author zhangqing
 * @since 2021-07-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@SuperBuilder(toBuilder = true)
@AllArgsConstructor
@NoArgsConstructor
public class SysLoginLog implements Serializable {


    private Long id;

    /**
     * 租户code
     */
    private String tenantCode;

    /**
     * 登录名
     */
    private String loginName;

    /**
     * 登录状态（0:失败 1:成功）
     */
    private Boolean status;

    /**
     * IP地址
     */
    private String ipaddr;

    /**
     * 登录地点
     */
    private String loginLocation;

    /**
     * 网络
     */
    private String network;

    /**
     * 浏览器
     */
    private String browser;

    /**
     * 操作系统
     */
    private String os;

    /**
     * 提示消息
     */
    private String msg;

    /**
     * 登录时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    public static final String ID = "id";

    public static final String TENANT_CODE = "tenant_code";

    public static final String LOGIN_NAME = "login_name";

    public static final String STATUS = "status";

    public static final String IPADDR = "ipaddr";

    public static final String LOGIN_LOCATION = "login_location";

    public static final String NETWORK = "network";

    public static final String BROWSER = "browser";

    public static final String OS = "os";

    public static final String MSG = "msg";

    public static final String CREATE_TIME = "create_time";

}
